home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 10 / AACD 10.iso / AACD / Magazine / Morphos / GCC / ppc-amigaos / include / clib / iffparse_protos.h < prev    next >
C/C++ Source or Header  |  2000-02-28  |  4KB  |  104 lines

  1. #ifndef  CLIB_IFFPARSE_PROTOS_H
  2. #define  CLIB_IFFPARSE_PROTOS_H
  3.  
  4. /*
  5. **    $VER: iffparse_protos.h 39.1 (1.6.92)
  6. **    Includes Release 40.15
  7. **
  8. **    C prototypes. For use with 32 bit integers only.
  9. **
  10. **    (C) Copyright 1990-1993 Commodore-Amiga, Inc.
  11. **        All Rights Reserved
  12. */
  13.  
  14. #ifndef  EXEC_TYPES_H
  15. #include <exec/types.h>
  16. #endif
  17. #ifndef  LIBRARIES_IFFPARSE_H
  18. #include <libraries/iffparse.h>
  19. #endif
  20. /*--- functions in V36 or higher (Release 2.0) ---*/
  21.  
  22. /* Basic functions */
  23.  
  24. struct IFFHandle *AllocIFF( void );
  25. LONG OpenIFF( struct IFFHandle *iff, long rwMode );
  26. LONG ParseIFF( struct IFFHandle *iff, long control );
  27. void CloseIFF( struct IFFHandle *iff );
  28. void FreeIFF( struct IFFHandle *iff );
  29.  
  30. /* Read/Write functions */
  31.  
  32. LONG ReadChunkBytes( struct IFFHandle *iff, APTR buf, long numBytes );
  33. LONG WriteChunkBytes( struct IFFHandle *iff, APTR buf, long numBytes );
  34. LONG ReadChunkRecords( struct IFFHandle *iff, APTR buf, long bytesPerRecord,
  35.     long numRecords );
  36. LONG WriteChunkRecords( struct IFFHandle *iff, APTR buf, long bytesPerRecord,
  37.     long numRecords );
  38.  
  39. /* Context entry/exit */
  40.  
  41. LONG PushChunk( struct IFFHandle *iff, long type, long id, long size );
  42. LONG PopChunk( struct IFFHandle *iff );
  43.  
  44. /* Low-level handler installation */
  45.  
  46. LONG EntryHandler( struct IFFHandle *iff, long type, long id, long position,
  47.     struct Hook *handler, APTR object );
  48. LONG ExitHandler( struct IFFHandle *iff, long type, long id, long position,
  49.     struct Hook *handler, APTR object );
  50.  
  51. /* Built-in chunk/property handlers */
  52.  
  53. LONG PropChunk( struct IFFHandle *iff, long type, long id );
  54. LONG PropChunks( struct IFFHandle *iff, LONG *propArray, long numPairs );
  55. LONG StopChunk( struct IFFHandle *iff, long type, long id );
  56. LONG StopChunks( struct IFFHandle *iff, LONG *propArray, long numPairs );
  57. LONG CollectionChunk( struct IFFHandle *iff, long type, long id );
  58. LONG CollectionChunks( struct IFFHandle *iff, LONG *propArray,
  59.     long numPairs );
  60. LONG StopOnExit( struct IFFHandle *iff, long type, long id );
  61.  
  62. /* Context utilities */
  63.  
  64. struct StoredProperty *FindProp( struct IFFHandle *iff, long type, long id );
  65. struct CollectionItem *FindCollection( struct IFFHandle *iff, long type,
  66.     long id );
  67. struct ContextNode *FindPropContext( struct IFFHandle *iff );
  68. struct ContextNode *CurrentChunk( struct IFFHandle *iff );
  69. struct ContextNode *ParentChunk( struct ContextNode *contextNode );
  70.  
  71. /* LocalContextItem support functions */
  72.  
  73. struct LocalContextItem *AllocLocalItem( long type, long id, long ident,
  74.     long dataSize );
  75. APTR LocalItemData( struct LocalContextItem *localItem );
  76. void SetLocalItemPurge( struct LocalContextItem *localItem,
  77.     struct Hook *purgeHook );
  78. void FreeLocalItem( struct LocalContextItem *localItem );
  79. struct LocalContextItem *FindLocalItem( struct IFFHandle *iff, long type,
  80.     long id, long ident );
  81. LONG StoreLocalItem( struct IFFHandle *iff, struct LocalContextItem *localItem,
  82.     long position );
  83. void StoreItemInContext( struct IFFHandle *iff,
  84.     struct LocalContextItem *localItem,
  85.     struct ContextNode *contextNode );
  86.  
  87. /* IFFHandle initialization */
  88.  
  89. void InitIFF( struct IFFHandle *iff, long flags, struct Hook *streamHook );
  90. void InitIFFasDOS( struct IFFHandle *iff );
  91. void InitIFFasClip( struct IFFHandle *iff );
  92.  
  93. /* Internal clipboard support */
  94.  
  95. struct ClipboardHandle *OpenClipboard( long unitNumber );
  96. void CloseClipboard( struct ClipboardHandle *clipHandle );
  97.  
  98. /* Miscellaneous */
  99.  
  100. LONG GoodID( long id );
  101. LONG GoodType( long type );
  102. STRPTR IDtoStr( long id, STRPTR buf );
  103. #endif     /* CLIB_IFFPARSE_PROTOS_H */
  104.